<div ng-controller="RecruitCtrl as vm">
    <section class="content-header">
        <!-- Content Header (Page header) -->
        <h1>
      Recruitment Report
      <small></small>
    </h1>
        <ol class="breadcrumb">
            <li>
                <!-- <button class="btn btn-danger btn-xs" ng-click="vm.saveTurnoverLeaderTable()"><i class="fa fa-check-square-o"></i>Submit</button> -->
            </li>
        </ol>
    </section>
    <!-- Main content -->
    <section class="content">
        <div class="box box-info">
            <div class="box-header with-border">
                <h3 class="box-title">Statistics of Recruitment </h3>
                <small class="text-warning">{{vm.msg}}</small>
                <button ng-disabled="!vm.editable|| vm.loading" class="btn btn-danger btn-xs pull-right" ng-click="vm.saveTable()"><i class="fa fa-check-square-o"></i>Submit</button>
            </div>
            <div class="box-body table-responsive no-padding">
                <table class="table table-hover">
                    <form class="form-inline">
                        <table class="table table-bordered table-condensed">
                            <tr>
                                <th rowspan="2">Source</th>
                                <th colspan="2">Source of Applicants</th>
                                <th colspan="2">Source of New Comers</th>
                            </tr>
                            <tr>
                                <th>MTD.</th>
                                <th>YTD.</th>
                                <th>MTD.</th>
                                <th>YTD.</th>
                            </tr>
                            <tr ng-repeat="ret in vm.result">
                                
                                <td>{{ret.type}}  <input type="text" ng-disabled="!vm.editable" ng-model="ret.comment" ng-if="ret.input" /></td>
                                <td >
                                    <div ng-if="!ret.no"><input type="text" ng-disabled="!vm.editable" class="number-input" ng-model="ret.amtd" ng-change="vm.calculateYtd(ret)" /></div>
                                </td>
                                <td>
                                   <div ng-if="!ret.no">{{ret.aytd}}</div>
                                </td>
                                <td>
                                    <input type="text" ng-disabled="!vm.editable" class="number-input" ng-model="ret.nmtd" ng-change="vm.calculateYtd(ret)" />
                                </td>
                                <td>
                                   {{ret.nytd}}
                                   </td>
                                
                            </tr>
                        </table>
                    </form>
                </table>
            </div>
            <!-- /.box-body -->
        </div>
        <!-- /.box -->
</div>
</section>
<!-- /.content -->
</div>
